package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
	"goravel/app/models/common"
)

type AbNormalRequest struct {
	ID           string             `form:"id" json:"id"`
	UserIDS      []int              `form:"user_ids" json:"user_ids"`
	ServiceIDS   []int              `form:"service_ids" json:"service_ids"`
	Hand         string             `form:"hand" json:"hand"` //是否手工
	ScoreAssigns common.ScoreAssign `form:"score_assigns" json:"score_assigns"`
}

func (r *AbNormalRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *AbNormalRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{
		"id":          "required",
		"user_ids":    "required",
		"service_ids": "required",
	}
}

func (r *AbNormalRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *AbNormalRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *AbNormalRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
